<?php include '../header.php'; ?>
<?php include '../connect.php'; ?>

	<div id="teaser">
	</div>
	
	  <div id="main">

		<div id="gauche">
			<div class="nothing">
				<?php include '../sidebar.php'; ?>
			</div>
		</div>

		<div id="droite">
			<div class="nothing">
				<div class="subcolumns">
					<div class="c25l">
						<div class="subcl">
							<div class="ylert">
							
							</div>
						</div>
					</div>

					<div class="c75r">
					
						<div class="subcr">
							
							<form action="#" onsubmit="showLocation(); return false;" name="mapp">
							  <p>
								<b>Search for an address:</b>
								<input type="text" name="q" value="" class="address_input" size="40" />
								<input type="submit" name="find" value="Search" />
   
							  </p>
							</form>
							<div id="map" style="width: 500px; height: 300px"></div>
<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAA2UAfAJpyLTceIHoL2s7JfBRSmkjHXOPrVSa9FijTDBpji8CUrxTKSc5UAUBVydcX3NpgBFXXDf5lvA" 
			type="text/javascript"></script>
	<script type="text/javascript">

	var map;
	var geocoder;

	function initialize() {
	  map = new GMap2(document.getElementById("map"));
	  map.setCenter(new GLatLng(43.298344,5.383221), 12);
	  map.addControl(new GLargeMapControl())
	  geocoder = new GClientGeocoder();
	}

	// addAddressToMap() is called when the geocoder returns an
	// answer.  It adds a marker to the map with an open info window
	// showing the nicely formatted version of the address and the country code.
	function addAddressToMap(response) {
	  map.clearOverlays();
	  if (!response || response.Status.code != 200) {
		alert("Sorry, we were unable to geocode that address");
	  } else {
		place = response.Placemark[0];
		point = new GLatLng(place.Point.coordinates[1],
							place.Point.coordinates[0]);
		marker = new GMarker(point);
		map.addOverlay(marker);
		marker.openInfoWindowHtml(place.address + '<br>' +
		  '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode);
	  }
	}

	// showLocation() is called when you click on the Search button
	// in the form.  It geocodes the address entered into the form
	// and adds a marker to the map at that location.
	function showLocation() {
	  var address = document.mapp.q.value;
	  geocoder.getLocations(address, addAddressToMap);
	}

   // findLocation() is used to enter the sample addresses into the form.
	function findLocation(address) {
	  document.forms[0].q.value = address;
	  showLocation();
	}
	</script>
	
								
							
						</div>
					</div>
				</div>
			</div>
		</div>

<? include '../footer.php'; ?>